package com.jht.btconnect.common;

import android.content.Context;
import android.location.LocationManager;

import com.jht.btconnect.BTApp;

public class GPSUtil {

    public static boolean isGPSOpen(){
        LocationManager locationManager = (LocationManager) (BTApp.getAppContext()).getSystemService(Context.LOCATION_SERVICE);
        boolean gpsLocation = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
        boolean networkLocation = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
        if (gpsLocation || networkLocation) {
            return true;
        }
        return false;
    }

}
